<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<button>点我</button>
</body>
<script type = module>
	import jsonp from "./index.js";
	// https://www.baidu.com/sugrec?prod=pc&wd=1&cb=cb
	document.querySelector("button").onclick = function(){
		jsonp("https://www.baidu.com/sugrec",{
			params:{
				prod:"pc",
				wd:"三国"
			},
			jsonp:"cb"
		}).then(value=>{
			console.log(value)
		})
	}
</script>

</html>